package com.rms.hkpc.dialog;

import android.content.Context;
import android.view.View;

import androidx.annotation.NonNull;

import com.rms.hkpc.R;


public class DeleteDialog extends BaseDialog {

    public DeleteDialog(@NonNull Context context,OnClickListener onClickListener) {
        super(context, R.style.toast_dialog);
        this.onClickListener = onClickListener;
    }

    @Override
    public void refreshView() {

    }

    @Override
    public void initView() {
        findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
        findViewById(R.id.btn_delete).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickListener.okClick();
                dismiss();
            }
        });
    }

    @Override
    public int getLayoutId() {
        return R.layout.dialog_delete;
    }


    private OnClickListener onClickListener;

    public interface OnClickListener {
        void okClick();
    }
}
